<?php
include_once("common/dbConnect.php");
$handle = db_connect();
$name = $_REQUEST["name"];
$age = $_REQUEST["age"];
$tel = $_REQUEST["tel"];

$query = "insert into Student (StudentName,StudentAge,StudentTel) values ('$name','$age','$tel')";
$result = mysql_query($query);
if (!$result) {
    echo "There was a database error when executing.";
    echo mysql_error();
    exit;
}
echo "success";

//header("refresh:1;url='index.php'");
//header('Location: index.php');//跳转
